//
//  DWLogManager.h
//  OCAPPDemo
//
//  Created by OS on 2022/1/10.
//

#import <UIKit/UIKit.h>
#import <CocoaLumberjack/CocoaLumberjack.h>

static const int ddLogLevel = DDLogLevelVerbose;

@interface DWLogManager : NSObject

@property (nonatomic, assign) BOOL openLog;

+ (instancetype)sharedManager;

+ (NSString *)getCrashPath;
+ (NSString *)getLogPath;

/// 初始化日志
+ (void)startDDLog;

/// 初始化崩溃
+ (void)startCrash;

+ (void)logError:(NSString *)string;
+ (void)logWarn:(NSString *)string;
+ (void)logInfo:(NSString *)string;
+ (void)logDebug:(NSString *)string;
+ (void)logVerbose:(NSString *)string;

@end

/// 崩溃模型
@interface DWCrashLogModel : NSObject

@property (nonatomic, copy) NSString *appVer;
@property (nonatomic, copy) NSString *buildVer;
@property (nonatomic, copy) NSString *systemVer;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *reason;
@property (nonatomic, strong) NSArray<NSString *> *message;
@property (nonatomic, copy) NSString *crateDate;

@end
